<template>
  <div class="flex flex-justify-center flex-align-center">
    <el-card class="form-container">
      <el-form :model="form"
               ref="orderSettingForm"
               label-width="150px">
        <el-form-item label="秒杀订单超过:">
          <el-input v-model="form.fast" class="input-width">
            <template slot="append">分</template>
          </el-input>
          <span class="margin-left-15">未付款，订单自动关闭</span>
        </el-form-item>
        <el-form-item label="正常订单超过:">
          <el-input v-model="form.normal" class="input-width">
            <template slot="append">分</template>
          </el-input>
          <span class="margin-left-15">未付款，订单自动关闭</span>
        </el-form-item>
        <el-form-item label="发货超过:">
          <el-input v-model="form.delivery" class="input-width">
            <template slot="append">天</template>
          </el-input>
          <span class="margin-left-15">未收货，订单自动完成</span>
        </el-form-item>
        <el-form-item label="订单完成超过:">
          <el-input v-model="form.orderSales" class="input-width">
            <template slot="append">天</template>
          </el-input>
          <span class="margin-left-15">自动结束交易，不能申请售后</span>
        </el-form-item>
        <el-form-item label="订单完成超过:">
          <el-input v-model="form.orderStar" class="input-width">
            <template slot="append">天</template>
          </el-input>
          <span class="margin-left-15">自动五星好评</span>
        </el-form-item>
        <el-form-item>
          <el-button
            @click="confirm('orderSettingForm')"
            type="primary">提交</el-button>
        </el-form-item>
      </el-form>
    </el-card>
  </div>
</template>

<script>
  export default {
    name: "orderSetting",
    data() {
      return {
        form: {
          fast: '',
          normal: '',
          delivery: '',
          orderSales: '',
          orderStar: '',
        }
      }
    },
    methods: {
      confirm(formName){
        console.log(this.form)
      }
    }
  }
</script>

<style scoped>
  .input-width {
    width: 50%;
  }
  .margin-left-15 {
    margin-left: 15px;
  }
</style>
